package com.hl.toolkit.common.bean;

import org.springframework.http.HttpStatus;

public class BaseResult {
    // 状态码
    private int code = 0;

    // 状态描述
    private String message = "";

    public BaseResult() {
    }

    public BaseResult(final int code) {
        this.code = code;
    }

    public BaseResult(final int code, final String message) {
        this.code = code;
        this.message = message;
    }

    public BaseResult(final HttpStatus status) {
        this(status.value(), status.getReasonPhrase());
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
